feat(telegram): /commands shows inline keyboard button picker with Use/Cancel#13494
Open
SoRcKwYo wants to merge 3 commits intoNousResearch:mainfrom
Open
feat(telegram): /commands shows inline keyboard button picker with Use/Cancel#13494SoRcKwYo wants to merge 3 commits intoNousResearch:mainfrom
SoRcKwYo wants to merge 3 commits intoNousResearch:mainfrom
Conversation
cb94233 to
4de17fb
Compare
4de17fb to
aa8fc86
Compare
…-place pagination
…icker PR This code was accidentally included via cherry-pick and has no relation to the /commands inline keyboard picker feature.
aa8fc86 to
493ef90
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
On Telegram,
/commandsnow shows an interactive inline keyboard instead of a plain-text list. Each command appears as a tappable button. Tapping a button shows its description with ▶ Use and ✗ Cancel options — tapping Use dispatches the command directly; tapping Cancel returns to the picker. Pagination (◄ Prev / Next ►) edits the original message in-place rather than sending new messages.Non-Telegram platforms (Discord, CLI) retain the existing text-based paginated output.
Type of Change
Changes Made
gateway/platforms/telegram.py: addsend_commands_picker()with inline keyboard and in-place pagination viaedit_message_text; add_handle_commands_picker_callback()handlingmc:(show description + Use/Cancel),cu:(dispatch synthetic command event),cc:(back to picker),cp:(page flip); route new callbacks in_handle_callback_query; add_commands_picker_statedict to__init__.gateway/run.py:_handle_commands_command()detects Telegram platform and delegates tosend_commands_picker()instead of returning a text response.How to Test
/commandsto the bot.hermes -q /commands), verify the text list still works.Checklist